<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="__PUBLIC__/css/pintuer.css">
<link rel="stylesheet" href="__PUBLIC__/css/admin.css">
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/jquery-1.11.1.min.js"></script>
<script src="__PUBLIC__/js/pintuer.js"></script>
<script class="resources library" src="__PUBLIC__/area.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/utf8-php/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/utf8-php/ueditor.all.min.js"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/utf8-php/lang/zh-cn/zh-cn.js"></script>
<style type="text/css">
  div{
     width:100%;
  }
</style>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>增加内容</strong></div>
  <div class="body-content">
     
     <div class="panel admin-panel">
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li></li>
        <li>搜索：</li>
        <li>
         
        </li>
        <li>
          <input type="text" placeholder="请输入搜索关键字" name="keywords" class="input" style="width:250px; line-height:17px;display:inline-block"/>
          <a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()" > 搜索</a>
        </li>
      </ul>
    </div>
<form method="post" class="form-x" action="__URL__/tianjia" enctype="multipart/form-data"> 
     <div class="form-group">
        <div class="label">
          <label>公司名称：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="cname" value=""/>
          <div class="tips"></div>
        </div>
      </div>  

      <div class="form-group">
        <div class="label">
          <label>城市:</label>
        </div>
        <div class="field">
           <select id="s_province" name="s_province" class="input" onchange="changesearch()" style="width:100px; line-height:17px; display:inline-block"> 
          </select>
          &nbsp;&nbsp;
          
          <select id="s_city" name="s_city" class="input" onchange="changesearch()" style="width:100px; line-height:17px;display:inline-block">
          </select>
          &nbsp;&nbsp;
         
          <select id="s_county" name="s_county" class="input" onchange="changesearch()" style="width:100px; line-height:17px;display:inline-block">
          </select>

          <script type="text/javascript">_init_area();</script>
           <div id="show"></div>
          <script type="text/javascript">

              var Gid  = document.getElementById ;

              var showArea = function(){

                Gid('show').innerHTML = "<h3>省" + Gid('s_province').value + " - 市" +  

                Gid('s_city').value + " - 县/区" + 

                Gid('s_county').value + "</h3>"

                            }



    </script>
          <div class="tips"></div>
        </div>
      </div>
     
       <div class="form-group">
        <div class="label">
          <label>LOGO:</label>
        </div>
        <div class="field">
          <input type="file" class="input w50" name="imagename" value=""  />
          <div class="tips"></div>
        </div>
      </div> 
       <div class="form-group">
        <div class="label">
          <label>联系人：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="lianxiren" value=""  />
          <div class="tips"></div>
        </div>
      </div>  
       <div class="form-group">
        <div class="label">
          <label>电话：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="mobile" value=""  />
          <div class="tips"></div>
        </div>
      </div>  
      <div class="form-group">
        <div class="label">
          <label>qq:</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="qq" value=""  />
          <div class="tips"></div>
        </div>
      </div> 
      <div class="form-group">
        <div class="label">
          <label>详细地址：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="dizhi" value=""  />
          <div class="tips"></div>
        </div>
      </div> 
      <div class="form-group">
        <div class="label">
          <label>公司介绍：</label>
        </div>
        <div class="field">
          <div class="field">
            <script id="editor" type="text/plain" name="content" style="width:500px;height:250px;"></script>
        </div>
        <script type="text/javascript">

            //实例化编辑器
            //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
            var ue = UE.getEditor('editor');


            function isFocus(e){
                alert(UE.getEditor('editor').isFocus());
                UE.dom.domUtils.preventDefault(e)
            }
            function setblur(e){
                UE.getEditor('editor').blur();
                UE.dom.domUtils.preventDefault(e)
            }
            // function insertHtml() {
            //     var value = prompt('插入html代码', '');
            //     UE.getEditor('editor').execCommand('insertHtml', value)
            // }
            function createEditor() {
                enableBtn();
                UE.getEditor('editor');
            }
            function getAllHtml() {
                alert(UE.getEditor('editor').getAllHtml())
            }
            function getContent() {
                var arr = [];
                arr.push("使用editor.getContent()方法可以获得编辑器的内容");
                arr.push("内容为：");
                arr.push(UE.getEditor('editor').getContent());
                alert(arr.join("\n"));
            }
            // function getPlainTxt() {
            //     var arr = [];
            //     arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
            //     arr.push("内容为：");
            //     arr.push(UE.getEditor('editor').getPlainTxt());
            //     alert(arr.join('\n'))
            // }
            function setContent(isAppendTo) {
                var arr = [];
                arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容");
                UE.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo);
                alert(arr.join("\n"));
            }
            function setDisabled() {
                UE.getEditor('editor').setDisabled('fullscreen');
                disableBtn("enable");
            }

            function setEnabled() {
                UE.getEditor('editor').setEnabled();
                enableBtn();
            }

            function getText() {
                //当你点击按钮时编辑区域已经失去了焦点，如果直接用getText将不会得到内容，所以要在选回来，然后取得内容
                var range = UE.getEditor('editor').selection.getRange();
                range.select();
                var txt = UE.getEditor('editor').selection.getText();
                alert(txt)
            }

            function getContentTxt() {
                var arr = [];
                arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
                arr.push("编辑器的纯文本内容为：");
                arr.push(UE.getEditor('editor').getContentTxt());
                alert(arr.join("\n"));
            }
            function hasContent() {
                var arr = [];
                arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
                arr.push("判断结果为：");
                arr.push(UE.getEditor('editor').hasContents());
                alert(arr.join("\n"));
            }
            function setFocus() {
                UE.getEditor('editor').focus();
            }
            function deleteEditor() {
                disableBtn();
                UE.getEditor('editor').destroy();
            }
            function disableBtn(str) {
                var div = document.getElementById('btns');
                var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
                for (var i = 0, btn; btn = btns[i++];) {
                    if (btn.id == str) {
                        UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
                    } else {
                        btn.setAttribute("disabled", "true");
                    }
                }
            }
            function enableBtn() {
                var div = document.getElementById('btns');
                var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
                for (var i = 0, btn; btn = btns[i++];) {
                    UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
                }
            }

            function getLocalData () {
                alert(UE.getEditor('editor').execCommand( "getlocaldata" ));
            }

            function clearLocalData () {
                UE.getEditor('editor').execCommand( "clearlocaldata" );
                alert("已清空草稿箱")
            }
        </script>
          <div class="tips"></div>
        </div>
      </div>    
      <div class="form-group">
        <div class="label">
          <label>分类:</label>
        </div>
        <div class="field">
          <select name="fenlei" class="input" style="width:200px; line-height:17px;" onchange="changesearch()">
          	<option type="text" class="input w50" value="家装" name="fenlei" data-validate="required:请输入标题" />家装</option>
          	<option type="text" class="input w50" value="工装" name="fenlei" data-validate="required:请输入标题" />工装</option>
          </select>
          <div class="tips"></div>
        </div>
      </div>  
      <div class="form-group">
        <div class="label">
          <label>操作员：</label>
        </div>
        <div class="field">
            <input type="text" class="input w50" name="operator" value="{$_SESSION['username']}" disabled="disabled"  />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>

</body></html>